/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.uoc.tdp.pac3.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * Classe abstracte amb propietats comunes al domini.
 * @author Gerard
 */
public abstract class BaseDomain implements Serializable {
    
    private Integer id;
    
    private Date creationDate;

    public BaseDomain() {
    }

    public BaseDomain(Integer id, Date creationDate) {
        this.id = id;
        this.creationDate = creationDate;
    }
    
    public Date getCreationDate() {
        return creationDate;
    }
    
    public void setCreationDate(Date creationDate) {
        this.creationDate = creationDate;
    }
    
    public void setCreationDate(java.sql.Date creationDate) {
        this.creationDate = new Date(creationDate.getTime());
    }
    
    

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return id.toString();
    }
    
    
    
    
    
}
